<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <table id="tb">
        <tr>
            <th>姓名</th>
            <th>年龄</th>
            <th>性别</th>
        </tr>
        <tr class="alt">
            <td>芳华</td>
            <td>32</td>
            <td>女</td>
        </tr>
        <tr>
            <td>刘烨</td>
            <td>30</td>
            <td>男</td>
        </tr>
        <tr class="alt">
                <td>明明</td>
                <td>28</td>
                <td>男</td>
            </tr>
    </table>
</body>
<style>
   

    #tb{
        /* 单线边框 */
        border-collapse: collapse;
        width: 500px;
    }

    #tb td,#tb th{
        border: 1px solid aqua;
    }

    #tb th{
        text-align: right;
        background-color: aqua;
        color: #ffffff;
    }

    #tb tr.alt td{
        color: black;
        background-color: aquamarine;
    }
</style>
</html>